Free online tool

Free Online Text Comparison Tool

Compare two versions of a text side by side, see added and removed lines, and spot word-level changes inside edited lines.

Text Comparison ToolFree online tool. Runs in your browser.
Live

Two versions of a document sit in front of you, and one of them has a change you cannot find. Reading both again and again is slow and unreliable, because the human eye skips differences. A comparison tool does the careful work for you: it lines up both texts, marks what was removed, what was added and what changed inside a line.

How the comparison works

The tool uses the same idea as version control systems such as Git. It looks for the longest sequence of lines that appear in both texts in the same order. Those lines are “the same”. Everything else is either removed from the first text or added in the second. Finding the smallest possible set of changes is called the shortest edit script, and the tool uses a well-known algorithm (the Myers algorithm) that does this quickly even for long texts with a few changes.

When a removed line sits right next to an added line, the tool treats them as one changed line and compares them again word by word. That is how you can see that only “Monday” turned into “Tuesday” while the rest of the line stayed the same.

How to use it

  1. Paste the original text on the left and the changed version on the right.
  2. Press Compare. The result appears below the boxes.
  3. Read the tiles: same lines, changed lines, lines only in the original, lines only in the new version and a match percentage.
  4. In the view, pink marks what was removed or changed on the left, and cyan marks what was added or changed on the right.
  5. Tick “Show only the differences” to hide unchanged lines in a long text.
  6. Use “Swap sides” if you pasted them the wrong way round.

Settings that matter

Setting When to use it
Ignore upper and lower case When a case change does not matter, such as comparing lists
Ignore extra spaces When one text has different spacing or line wrapping
Show only the differences For long texts with a few changes

Ignoring extra spaces is on by default, because invisible spacing changes are rarely meaningful and often swamp the real changes.

A worked example

The example button loads a short email in two versions. The original reads: “Dear team, The meeting is on Monday at 10. Please bring your laptops. Thanks, Sam”, written on five lines. The changed version moves the day to Tuesday, adds “and notes”, and adds a new line saying the meeting will last one hour. The tool reports that three lines are the same, two lines are changed and one line exists only in the new version. In the changed lines you can see “Monday” struck through in pink and “Tuesday” in cyan. The match is about 38 percent, because only three of the eight comparison rows are identical, even though the email is still obviously the same message.

What people use it for

  • Editing. See what an editor or teammate changed in a draft.
  • Contracts and policies. Compare two versions of terms before you accept them. Always read the full text too.
  • Code and configuration. Spot a changed setting in a file.
  • Lists. Find what is new or missing between two exports.
  • Homework checking. Compare your answer to a model answer line by line.

Common mistakes

  • Comparing texts with different line breaks. If one version wraps lines differently, the tool will show almost everything as changed. Join the lines into paragraphs first.
  • Forgetting that a moved paragraph shows as removed in one place and added in another.
  • Trusting the match percentage as a measure of meaning. It only counts identical lines.
  • Using it for plagiarism decisions. A line match is not proof of anything.
  • Pasting very large files. Compare sections instead.

Reading the output well

Do not scan the whole view at once. Start with the tiles to learn how big the change is. If nearly all lines match, jump through the pink and cyan rows. If almost nothing matches, check line breaks first. A common trick is to compare in two passes: first with extra spaces and case ignored, to find the real content changes, and then with them switched on, to find formatting changes. Keep in mind that the tool compares exact characters, so a curly quote and a straight quote count as different, even though they look alike on the page.

Limits and privacy

The comparison is made in your browser. Nothing is uploaded or saved. You can compare up to 400,000 characters in each box. If two long texts are very different, the tool may refuse to compare them line by line and ask you to use smaller sections, which keeps your browser responsive. The comparison is based on exact characters after your settings, so a curly apostrophe and a straight one count as different.

Related tools include the remove duplicate lines tool and the find and replace tool. For working with versions of code, the Git and GitHub course explains how change tracking works, and our guide to writing professional emails helps with the drafting side.

Key takeaways

  • The tool finds the smallest set of added and removed lines.
  • Changed lines are compared again word by word.
  • Fix line wrapping first so the result is meaningful.
  • Everything happens in your browser.

Questions

How does the tool find differences?

It finds the longest run of lines that appear in both texts in the same order, treats them as unchanged, and marks everything else as removed from the first text or added in the second. Where a removed line sits next to an added line, it compares them word by word to show the exact change.

What do the pink and cyan colours mean?

Pink on the left shows lines or words that were removed or changed in the original. Cyan on the right shows lines or words that were added or changed in the new version. The meaning is also given by the position: the left side is the original and the right side is the changed text.

Why does almost everything show as different?

Usually because the two versions break lines in different places, so no whole lines match. Join each paragraph onto one line in both texts and compare again. Also check for extra spaces, which the tool ignores by default, and for different quote marks or dashes that look the same but are different characters.

Can I ignore capital letters and spacing?

Yes. Tick Ignore upper and lower case to treat letters in either case as equal, and keep Ignore extra spaces on to ignore doubled spaces and spacing at line ends. The lines are shown with their original letters and spacing, and only the comparison is relaxed.

Is the text I compare stored anywhere?

No. Both texts are processed in your browser and nothing is uploaded or saved. When you reload or close the page, the text is gone. This makes the tool suitable for private drafts and work documents, but you should still follow your own organisation's rules for sensitive information.